home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacFormat España 15
/
macformat_15.iso
/
C de cerca
/
Codewarrior Lite
/
MacOS Support
/
Headers
/
ANSI Headers
/
string.h
< prev
next >
Wrap
Text File
|
1995-12-29
|
3KB
|
121 lines
/* string.h standard header */
#ifndef _STRING
#define _STRING
#ifndef _YVALS
#include <yvals.h>
#endif
#if __MWERKS__
#pragma options align=mac68k
#if __CFM68K__ && __USING_IMPORTED_ANSI__
#pragma import on
#endif
#endif
/* externally set this to 1 in order to force ANSI calls for string inlines */
#ifndef _NO_FAST_STRING_INLINES_
#define _NO_FAST_STRING_INLINES_ 0
#endif
/* macros */
#ifndef NULL
#define NULL _NULL
#endif
/* type definitions */
#ifndef _SIZET
#define _SIZET
typedef _Sizet size_t;
#endif
/* declarations */
_C_LIB_DECL
int memcmp(const void *, const void *, size_t);
void *memmove(void *, const void *, size_t);
void *memset(void *, int, size_t);
char *strcat(char *, const char *);
int strcmp(const char *, const char *);
int strcoll(const char *, const char *);
size_t strcspn(const char *, const char *);
char *strerror(int);
char *strncat(char *, const char *, size_t);
int strncmp(const char *, const char *, size_t);
char *strncpy(char *, const char *, size_t);
size_t strspn(const char *, const char *);
char *strtok(char *, const char *);
size_t strxfrm(char *, const char *, size_t);
char *_Strerror(int, char *);
_END_C_LIB_DECL
#if !__MC68K__ || _NO_FAST_STRING_INLINES_
_C_LIB_DECL
size_t strlen(const char *);
char *strcpy(char *, const char *);
void *memcpy(void *, const void *, size_t);
_END_C_LIB_DECL
#else /* !(!__MC68K__ || _NO_FAST_STRING_INLINES_) */
_C_LIB_DECL
size_t __strlen(const char *:__A0):__D0 = { 0x70FF,0x5280,0x4A18,0x66FA };
char *__strcpy(char *:__A0,const char *:__A1):__D0 = { 0x2008,0x10D9,0x66FC };
char *__memcpy(void *:__A0,const void *:__A1,size_t:__D1):__D0 = { 0x2008,0x4A81,0x6706,0x10D9,0x5381,0x66FA };
_END_C_LIB_DECL
#ifdef __cplusplus
/* double inlines, for C++ */
inline size_t strlen(const char *x) { return (__strlen(x)); }
inline char *strcpy(char *x, const char *y) { return (__strcpy(x,y)); }
inline void *memcpy(void *x, const void *y, size_t z) { return (__memcpy(x,y,z)); }
#else
/* double macro overrides, for C */
size_t strlen(const char *);
char *strcpy(char *, const char *);
void *memcpy(void *, const void *, size_t);
#define strlen(x) __strlen(x)
#define strcpy(x,y) __strcpy((x),(y))
#define memcpy(x,y,z) __memcpy((x),(y),(z))
#endif
#endif /* !__MC68K__ || _NO_FAST_STRING_INLINES_ */
_C_LIB_DECL
void *memchr(const void *, int, size_t);
char *strchr(const char *, int);
char *strpbrk(const char *, const char *);
char *strrchr(const char *, int);
char *strstr(const char *, const char *);
_END_C_LIB_DECL
#ifdef __cplusplus
/* inlines and overloads, for C++ */
#define _Const_return const
inline char *strerror(int _Err)
{return _Strerror(_Err, 0); }
#else
#define _Const_return
/* macro overrides, for C */
#define strerror(err) _Strerror(err, 0)
#endif
#if __MWERKS__
#if __CFM68K__ && __USING_IMPORTED_ANSI__
#pragma import reset
#endif
#pragma options align=reset
#endif
#endif
/*
* Copyright (c) 1994 by P.J. Plauger. ALL RIGHTS RESERVED.
* Consult your license regarding permissions and restrictions.
*/
/* Change log:
*94June04 PlumHall baseline
*94Oct07 Inserted MW changes.
*/